<?php 
    session_start();
    header("Content-Type: text/html;charset=utf-8");
    if (!isset($_SESSION['login'])) {  echo "<script type=text/javascript> window.location = '../index.php'; </script>";   }
   require 'php/userData.php';
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="es-ES">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <link rel="shortcut icon" href="./images/fav_eStage.ico" />
    <title>eStage | Membership </title>
    <!--SCRIPTS-->
    <script type="text/javascript" src="js/functions.js"></script>
    <script type='text/javascript'>
    function actualizar(){
        document.location.reload();
    }
    </script>
    <!--CSS-->
    <link rel="stylesheet" href="css/style_i.css" type="text/css" media="screen" />
    <link rel="stylesheet" href="css/layout_i.css" type="text/css" media="screen" />
    <link rel="stylesheet" href="css/reset_i.css" type="text/css" media="screen" />
    
</head>
<body>
<!--    MENU DESPLEGABLE PCON OPCIONES OSBRE LA CUENTA-->
    <div id="menuDropUser">
                <ul class="dropdown">
                    <li class="active">Bienvenid@: <span><?php echo $nombre; ?></span></li>
			<li class="first"><a href="window.php?option=pictureForm" target="_blank" onClick="window.open(this.href, this.target, 'width=700,height=400,top=100,left=300,resizable=NO,location=NO'); return false;" >cambiar imagen</a></li>
                        <li><a href="window.php?option=passForm" target="_blank" onClick="window.open(this.href, this.target, 'width=700,height=400,top=100,left=400,resizable=NO,location=NO'); return false;" >cambiar contraseña</a></li>
                        <li class="last"><a href="php/close.php">cerrar sesion</a></li>
                </ul>
    </div>
<div class="contendorMenu">
<!--    MENU LATERAL DONDE VIENE LAS OCPIONES PARA EL CLIENTE-->
    <div id="menuLateral">
        <div class="elementoMenu first">
            <a href="index.php?place=myprojects" >MIS PROYECTOS</a>
        </div>
        <div class="elementoMenu">
            <a href="index.php?place=accountState" >ESTADO DE CUENTA</a> 
        </div>
        <div class="elementoMenu">
            <a href="index.php?place=projetcsHistory" >PROYECTOS ANTERIORES</a>
        </div>
        <div class="elementoMenu">
             <a href="index.php?place=paymentsHistory" >HISTORIAL DE PAGOS</a>
        </div>
        <div class="elementoMenu">
             <a href="index.php?place=contactForm" >CONTACTAR MIEMBRO</a>
        </div>
    </div>        
</div>
<!--    CONTENIDO GENERADO MEDIANTE PHP Y CONSULTAS-->
    <div class="content">
        <?php
            switch ($_GET['place']) {
                            case 'myprojects':
                                include 'php/myprojects.php';
                                break;
                            case 'accountState':
                                include 'php/accountState.php';
                                break;
                            case 'projetcsHistory':
                                include 'php/projectsHistory.php';
                                break;
                            case 'paymentsHistory':
                                include 'php/paymentsHistory.php';
                                break;
                            case 'contactForm':
                                   if(isset($_POST['enviado'])) {  require 'php/cartero.php'; }   else{  require 'php/contactForm.php'; }
                                break;
                            case 'serviceList':
                                require 'php/serviceList.php';
                                break;;
                            default:
                                include 'php/myprojects.php';
                                break;
                                }
        ?>
    </div>
<!--LOGO DE LA PARTE SUPERIOR-->
    <div class="logoeStage" >
        <h1>e<span>S</span>tage</h1>
    </div>
<!--IMAGEN DEL CLIENTE-->
    <div id="imagen">
        <?php
                require 'php/imagenDeUsuario.php';
        ?>
    </div>

  <script type="text/javascript" src="js/jquery.js"></script>
  <script type="text/javascript" src="js/main.js"></script> 
   
	</body>
</body>
</html>